package com.cloud.code.牛客网;

/**
 * 551. 学生出勤记录 I
 */
public class Test59 {

    public static void main(String[] args) {
        restoreString("codeleet",new int[]{4,5,6,7,0,2,1,3});
    }

    public static String restoreString(String s, int[] indices) {
        char[] chars = s.toCharArray();
        char[] newchars = new char[chars.length];
        for (int i = 0; i < indices.length; i++) {
           newchars[indices[i]] = chars[i];
        }
        return String.valueOf(newchars);
    }

}
